#include <LengthUnit.h>
#include <Quantity.h>

LengthUnit::LengthUnit (int ratio, const string name) :
   Unit (ratio, name)
{
}

ostream& LengthUnit::output (ostream& out, const Quantity <LengthUnit> quantity)
{
   outputInUnit (out, quantity, MILE);
   outputInUnit (out, quantity % Quantity <LengthUnit> (1, MILE), YARD);
   outputInUnit (out, quantity % Quantity <LengthUnit> (1, YARD), FEET);
   outputInUnit (out, quantity % Quantity <LengthUnit> (1, FEET), INCH);

   return out;
}
